package com.quickask.entity;

import java.io.Serializable;

/**
 * Created by NaSa on 2015/10/5.
 */
public class AsknowUQL implements Serializable {
    private AsknowQuestionSetEntity asknowQuestionSetEntity;
    private AsknowQuestionLocationSetEntity asknowQuestionLocationSetEntity;
    private AsknowUserPrivilegeEntity asknowUserPrivilegeEntity;
    private Double distance;

    public AsknowQuestionSetEntity getAsknowQuestionSetEntity() {
        return asknowQuestionSetEntity;
    }

    public void setAsknowQuestionSetEntity(AsknowQuestionSetEntity asknowQuestionSetEntity) {
        this.asknowQuestionSetEntity = asknowQuestionSetEntity;
    }

    public AsknowQuestionLocationSetEntity getAsknowQuestionLocationSetEntity() {
        return asknowQuestionLocationSetEntity;
    }

    public void setAsknowQuestionLocationSetEntity(AsknowQuestionLocationSetEntity asknowQuestionLocationSetEntity) {
        this.asknowQuestionLocationSetEntity = asknowQuestionLocationSetEntity;
    }

    public AsknowUserPrivilegeEntity getAsknowUserPrivilegeEntity() {
        return asknowUserPrivilegeEntity;
    }

    public void setAsknowUserPrivilegeEntity(AsknowUserPrivilegeEntity asknowUserPrivilegeEntity) {
        this.asknowUserPrivilegeEntity = asknowUserPrivilegeEntity;
    }

    public Double getDistance() {
        return distance;
    }

    public void setDistance(Double distance) {
        this.distance = distance;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof AsknowUQL)) return false;

        AsknowUQL asknowUQL = (AsknowUQL) o;

        if (asknowQuestionSetEntity != null ? !asknowQuestionSetEntity.equals(asknowUQL.asknowQuestionSetEntity) : asknowUQL.asknowQuestionSetEntity != null)
            return false;
        if (asknowQuestionLocationSetEntity != null ? !asknowQuestionLocationSetEntity.equals(asknowUQL.asknowQuestionLocationSetEntity) : asknowUQL.asknowQuestionLocationSetEntity != null)
            return false;
        if (asknowUserPrivilegeEntity != null ? !asknowUserPrivilegeEntity.equals(asknowUQL.asknowUserPrivilegeEntity) : asknowUQL.asknowUserPrivilegeEntity != null)
            return false;
        return !(distance != null ? !distance.equals(asknowUQL.distance) : asknowUQL.distance != null);

    }

    @Override
    public int hashCode() {
        int result = asknowQuestionSetEntity != null ? asknowQuestionSetEntity.hashCode() : 0;
        result = 31 * result + (asknowQuestionLocationSetEntity != null ? asknowQuestionLocationSetEntity.hashCode() : 0);
        result = 31 * result + (asknowUserPrivilegeEntity != null ? asknowUserPrivilegeEntity.hashCode() : 0);
        result = 31 * result + (distance != null ? distance.hashCode() : 0);
        return result;
    }

    @Override
    public String toString() {
        return "AsknowUQL{" +
                "asknowQuestionSetEntity=" + asknowQuestionSetEntity +
                ", asknowQuestionLocationSetEntity=" + asknowQuestionLocationSetEntity +
                ", asknowUserPrivilegeEntity=" + asknowUserPrivilegeEntity +
                ", distance=" + distance +
                '}';
    }
}
